<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var day = 3;
        switch (day) {
            case 0:
                console.log("今天星期1");
                break;

            case 1:
                console.log("今天星期2");
                break;
            case 2:
                console.log("今天星期3");
                break;
            case 3:
                console.log("今天星期4");
                break;

            default:
                console.log("今天星期日");
                break;
        }


        var x=2;
        switch(x){
            case 1:
                console.log("x=1");
            case 2:
                console.log("x=2");
            case 3:
                console.log("x=3");
            default:
                console.log("x值未知");
        }
    </script>
</body>

</html>